-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Umi suggestion filtering #93
Conversation
Looking pretty good, just for clarification: This only shows completions for tag combinations still possible with what comes before, correct? Other than that, the I don't have time to try it out myself right now, but I will trust you that it doesn't break unrelated functionality. |
Correct. The mechanism of showing suggestions is untouched, I only change the suggestion array based on what's already defined.
I'll clean up console logs and do a sanity check when I find time to fix what's left.
…-------- Original Message --------
On Dec 24, 2022, 1:21 PM, DominikDoom wrote:
Looking pretty good, just for clarification: This only shows completions for tag combinations still possible with what comes before, correct?
Other than that, the console.log on line 730 can be removed, I just forgot to take that out after I finished testing the original implementation. It's a bit too spammy for normal use.
I don't have time to try it out myself right now, but I will trust you that it doesn't break unrelated functionality.
—
Reply to this email directly, [view it on GitHub](#93 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/A332QNJOS23IFIPLTLVPZETWO3TENANCNFSM6AAAAAATIFBYZY).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
OK, had to rewrite it a bit because the initial implementation was only optimised for a single umi tag in a prompt. Moreover, the filtering logic depends on which tag the cursor is focused at and this further complicated things. I feel it's pretty solid now. Please double-check me before merging if you find a minute because I'm far past my bedtime. |
Functionality wise, it seems good to me, normal completion also doesn't seem impacted, so all good to go. The only issue I noticed is that editing negative tags sometimes doesn't show completion if later tags have already restricted the tags further. E.g., Other than that there's only one console.log left that fills the console with the matches object, but I'll remove that myself after merging. There's still another one left in unrelated code, so I'll just do them both together. |
Yeah, retroactive editing is a bit clunky but it shouldn't be a big issue (I hope). We'll see what feedback people will leave. Thanks for merging it :). |
This is implementing an initial version of tag filtering. The goal is to get suggestions that take previous tags into account. This will make Umi prompting viable for widespread use. Right now debugging prompts it a bit tedious because we have to run the prompt to get debug info about what keywords get matched.
I still have to find a good solution for optional tags, so that it will match all other tags no matter where they are defined and only limit the selection to what's filtered through neg and pos parts.
Screen.Recording.2022-12-24.at.01.34.47.mov
Code quality and naming feedback appreciated. Wrote it late at night and I'm surprised it even works.